#ifndef DATAOBJECT_H
#define DATAOBJECT_H

#include <QObject>

class DataObject : public QObject {
    Q_OBJECT
    Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged)
    Q_PROPERTY(QString number READ number WRITE setNumber NOTIFY numberChanged)
    Q_PROPERTY(QString name2 READ name2 WRITE setName2 NOTIFY name2Changed)
    public:
    DataObject(QObject *parent = nullptr);
    DataObject(const QString &name, const QString &color, const QString &number, QObject *parent = nullptr);
    QString name() const;
    void setName(const QString &name);
    QString color() const;
    void setColor(const QString &color);
    QString number() const;
    void setNumber(const QString &number);

    QString name2() const;

    public slots:
    void setName2(QString name2);

    signals:
    void nameChanged();
    void colorChanged();
    void numberChanged();
    void name2Changed(QString name2);

    private:
    QString m_name;
    QString m_color;
    QString m_number;
    QString m_name2;
};

#endif // DATAOBJECT_H
